/*!
\copyright  Copyright (c) 2023 Qualcomm Technologies International, Ltd.\n
            All Rights Reserved.\n
            Qualcomm Technologies International, Ltd. Confidential and Proprietary.
*/

#ifndef CONN_ACL_STATUS_CHANNEL_EVENT_SPEC_H_
#define CONN_ACL_STATUS_CHANNEL_EVENT_SPEC_H_

#include "channel_event_spec_ids.h"
#include <bdaddr.h>
#include <connection.h>

/*! @{ */

/*! \brief The Connection ACL status event channel */
#define EVENT_BUS_CHANNEL_CONN_ACL_STATUS  conn_acl_status_event_channel

/*! \brief The BT connection ACL status events that are sent. */
typedef enum
{
    CONN_ACL_CONNECTED,
    CONN_ACL_DISCONNECTED,
    CONN_ACL_CONNECTING,
    CONN_ACL_DISCONNECTING,
    CONN_ACL_CONNECTING_FAILURE,
    CONN_ACL_SIMPLE_PAIRING_COMPLETE,
    CONN_ACL_BARGE_IN_REQUEST,
} conn_acl_status_event_t;

/*! \brief The address and status of a connected BT device. */
typedef struct
{
    /*! BT address of connected device. */
    tp_bdaddr tpaddr;
    /*! BT status */
    hci_status status;
} CONN_ACL_CONNECTED_T;

/*! \brief The address and status of a disconnected BT device. */
typedef struct
{
    /*! BT address of disconnected device. */
    tp_bdaddr tpaddr;
    /*! BT status */
    hci_status status;
} CONN_ACL_DISCONNECTED_T;

/*! \brief The address and status of a connecting BT device. */
typedef struct
{
    /*! BT address of connecting device. */
    tp_bdaddr tpaddr;
    /*! BT status */
    hci_status status;
} CONN_ACL_CONNECTING_T;

/*! \brief The address and status of a disconnecting BT device. */
typedef struct
{
    /*! BT address of disconnecting device. */
    tp_bdaddr tpaddr;
    /*! BT status */
    hci_status status;
} CONN_ACL_DISCONNECTING_T;

/*! \brief The address and status of a BT device that failed to connect. */
typedef struct
{
    /*! BT address of connecting failure device. */
    tp_bdaddr tpaddr;
    /*! BT status */
    hci_status status;
} CONN_ACL_CONNECTING_FAILURE_T;

/*! \brief The address and status of a BT device that has successfully connected. */
typedef struct
{
    /*! BT address of device with pairing attempt. */
    tp_bdaddr tpaddr;
    /*! BT status */
    hci_status status;
} CONN_ACL_SIMPLE_PAIRING_COMPLETE_T;

/*! \brief The address of a BT device with pairing attempt. */
typedef struct
{
    /*! BT address of device with pairing attempt. */
    tp_bdaddr tpaddr;
} CONN_ACL_BARGE_IN_REQUEST_T;

/*! @} */

#endif /* CONN_ACL_STATUS_CHANNEL_EVENT_SPEC_H_ */